#include "main.h"

const int* find(const vector<int>& vec, int val)
{
    for (int i = 0; i<vec.size(); i++) {
        if (vec[i] == val) {
            return &vec[i];
        }
    }
    return 0;
}
int main()
{
    vector<int>vec = {2,4,6,9,5};
    const int* val = find(vec, 9);
    return 0;
}